const {Schema, model} = require('mongoose')

const notesSchema = new Schema(
  {
    id: {
      type: String,
      required: true,
      unique: true,
    },
    title: {
      type: String,
      required: false,
    },
    text: {
      type: String,
      required: true,
    },
  },
  {
    versionKey: false,
  },
)

module.exports = model('Notes', notesSchema)
